<?php

$username = !empty($_POST['username']) ? $_POST['username'] : "";
$pwd = !empty($_POST['password']) ? $_POST['password'] : "";
if(!empty($username) && !empty($pwd)){
	if($username == "shunshi" && md5($pwd) == "e34469aafffc1d6ebd85491fc262b559"){
		Session_start();
		$_SESSION['username'] = $username;
		$msg =['code' => 200,'msg' =>'登录成功'];
		echo json_encode($msg);exit();
	}else{
		$msg =['code' => 400,'msg' =>'账号或密码错误'];
		echo json_encode($msg);exit();
	}
}else{
	$msg =['code' => 400,'msg' =>'账号或密码为空'];
		echo json_encode($msg);exit();
}
	
